import req from '@/lib/axios'
const $API = '/api'

//分页订单列表
const pagingOrder = data => req.post(
  `${$API}/order/pagingOrder`,
  data
);

//创建订单
const createOrder = data => req.post(
  `${$API}/order/createOrder`,
  data
);

//查询订单详情
const getOrderDetail = data => req.post(
  `${$API}/order/detail`,
  data
);

//修改订单状态
const changeOrderStatus = data => req.post(
  `${$API}/order/changeStatus`,
  data
);

//订单发货
const upsertDelivery = data => req.post(
  `${$API}/order/upsertDelivery`,
  data
);

export default {
  pagingOrder,
  createOrder,
  getOrderDetail,
  changeOrderStatus,
  upsertDelivery,
}